<!DOCTYPE html>
<!--引入模板引擎-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <title></title>
    <style type="text/css">

        #wrap{
            width: 100%;
            height: 600px;
            border: 5px solid black;
        }

        #left{
            width: 50%;
            height: 600px;
            border: 1px solid red;
            float: left;
        }

        #right{
            width: 49%;
            height: 600px;
            border: 1px solid orangered;
            float: right;
        }
    </style>
</head>
<body>
<div id="wrap">
    <div id="left">
        <table border="1" cellspacing="0" cellpadding="10">
            <tr>
                <th>编号</th>
                <th>姓名</th>
                <th>性别</th>
                <th>年级编号</th>
                <th>操作</th>
            </tr>
            <!--  @{引用路径}  #{做国际化} ${取值} *{} -->
            <form action="/students" method="get" >
                <input type="text"  name="searchName" th:value="${searchName}" >
                <input type="submit" >
            <tr th:each="student:${students.getList()}">
                    <input type="hidden"  name="id" th:value="${student?.id}" >
                <td th:text="${student.id}" name="id"></td>
                <td th:text="${student.name}" name="name"></td>
                <td th:text="${student.sex}" name="sex"></td>
                <td th:text="${student.grade.gradeName}" name="gradeId"></td>
                <td>
                    <a href="javascript:void(0)" th:href="@{/DELETEStudent/}+${student.id}">删除</a>
                    <a href="javascript:void(0)" th:href="@{/modify(id=${student.id})}">修改</a>

                 <!--   <a th:href="@{/student/}+${student.id}">-->
                </td>


            </tr>
            </form>

        </table>
        <!--  student.getPageNum();
        student.getTotal();
        student.getPages();
        student.getPageSize()-->
        <a href="javascript:void(0)" th:href="@{/modify}">新增</a>
        <a href="javascript:void(0)" th:href="@{/students}+1">首页</a>
        <a href="javascript:void(0)" th:href="@{/students}+${students.getPageNum()-1}">上一页</a>
        <a href="javascript:void(0)" th:href="@{/students}+${students.getPageNum()+1}">下一页</a>
        <a href="javascript:void(0)" th:href="@{/students}+${students.getPages()}">尾页</a>
        总页数:<span th:text="${students.getPages()}"></span>/当前页数:<span th:text="${students.getPageNum()}"></span>
    </div>
    <p>  <span th:if="${searchName==null}" > 王汝泉</span></p>
</div>

<script src="" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
</script>
</body>
</html>
